package com.roy.spring.demo;

import java.io.File;

/**
 * Created by mc on 18/4/23.
 */
public class FileDemo {
    public static void main(String[] args) {

        File f = null;
        File[] paths;

        try{
            // create new file
            f = new File("/Users/mc/mywork/uranus-spring/uranus/target/classes/com/roy/spring/ioc/demo");

            // returns pathnames for files and directory
            paths = f.listFiles();

            // for each pathname in pathname array
            for(File path:paths)
            {
                // prints file and directory paths
                System.out.println(path);
            }
        }catch(Exception e){
            // if any error occurs
            e.printStackTrace();
        }
    }
}
